using System;
using System.Runtime.InteropServices;

namespace WindowsAPI
{
    public static partial class Kernel32
    {
        public static class Events
        {
            [DllImport(FileName, SetLastError = true)]
            public static extern IntPtr CreateEvent(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState,
                                                    string lpName);

            [DllImport(FileName, SetLastError = true)]
            public static extern bool SetEvent(IntPtr hEvent);

            [DllImport(FileName, SetLastError = true)]
            public static extern bool ResetEvent(IntPtr hEvent);

            [DllImport(FileName, SetLastError = true)]
            public static extern bool PulseEvent(IntPtr hEvent);

            [DllImport(FileName, SetLastError = true, ExactSpelling = true)]
            public static extern Int32 WaitForSingleObject(IntPtr handle, Int32 milliseconds);
        }
    }
}